from django.conf.urls.defaults import *

urlpatterns = patterns('',
    # Example:
    # (r'^cookland/', include('cookland.apps.foo.urls.foo')),

    # Uncomment this for admin:
    (r'^admin/', include('django.contrib.admin.urls')),
    (r'^account/profile/(?P<username>\w+)/', 'cookland.account.views.profile'),
    (r'^account/edit/', 'cookland.account.views.edit_form'),
    (r'^account/login/', 'cookland.account.views.login_view'),
    (r'^account/logout/', 'cookland.account.views.logout_view'),
    (r'^account/login_form/', 'cookland.account.views.view_form'),
    (r'^accounts/login/$', 'cookland.account.views.view_form'),
    (r'^account/subscribe_form/', 'cookland.account.views.subscribe_form'),
    (r'^account/subscribe/', 'cookland.account.views.subscribe'),
    (r'^recipes/recipes_of_user/(?P<username>\w+)/','cookland.ricettario.views.recipes_of_user'),
    (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/django/cookland/media/'}),
    (r'^style/(?P<style>\w+)/(?P<next>.*)$','cookland.account.views.change_style'),
    
    #ishan
    (r'^recipes/view/(?P<pk>\w+)/?$', 'cookland.ricettario.views.view_recipe'),
    (r'^recipes/search/?$', 'cookland.ricettario.views.search_recipe'),
    (r'^recipes/insert/?$', 'cookland.ricettario.views.insert_recipe'),
    (r'^recipes/of_user/(?P<username>\w+)/?$', 'cookland.ricettario.views.recipes_of_user'),
    (r'^recipes/modify/(?P<pk>\w+)/?$', 'cookland.ricettario.views.modify_recipe'),
    (r'^recipes/top_ten/?$', 'cookland.ricettario.views.top_ten'),
    (r'^recipes/menu/(?P<parameter>\w+)/?$', 'cookland.ricettario.views.menu'),
    (r'^recipes/recipe_of_month/?$', 'cookland.ricettario.views.recipe_of_month'),
    (r'^recipes/install_db/?$', 'cookland.install.views.install_db'),


    #roots
    (r'^recipes/','cookland.account.views.index'),
)
